package com.tjs.lucky.infrastructure.po;

import com.tjs.lucky.domain.strategy.model.vo.StrategyDetailBriefVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;

/**
 * @Author: 田佳澍
 * @Description:
 * @DateTime: 2023/5/16 11:09
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class StrategyDetail {

    /**
     * 自增ID
     */
    private String id;

    /**
     * 策略ID
     */
    private Long strategyId;

    /**
     * 奖品ID
     */
    private String awardId;

    /**
     * 奖品名称
     */
    private String awardName;

    /**
     * 奖品库存
     */
    private Integer awardCount;

    /**
     * 奖品剩余库存
     */
    private Integer awardSurplusCount;

    /**
     * 中奖概率
     */
    private BigDecimal awardRate;

    /**
     * 创建时间
     */
    private String createTime;

    /**
     * 修改时间
     */
    private String updateTime;

    public StrategyDetailBriefVO convertToBriefVO() {
        StrategyDetailBriefVO strategyDetailBriefVO = new StrategyDetailBriefVO();
        BeanUtils.copyProperties(this, strategyDetailBriefVO);
        return strategyDetailBriefVO;
    }
}
